
class ChargeCurrOrderController {
    constructor($rootScope,$scope,$state,UserService,AccountService,LotteryService){
        Object.assign(this,{$rootScope,$scope,$state,UserService,AccountService,LotteryService});
        this.$rootScope.currentGroup= this.$state.params.cg;
        this.chargeResult = {};
        this.init();
    }

    /**
     * 初始化
     */
    init() {
        let self = this;
        //执行查询
        self.currOrder();
    }



    /**
     * 查询
     */
    currOrder(){
        let self  = this;
        self.AccountService.getCurrChargeOrders().then(_success).catch(_error);
        function _success(data) {
            // if(data.success==true){
            self.chargeResult = data;
            console.log(JSON.stringify( self.chargeResult ));
            // }
        }
        function _error(reason) {
            console.log(JSON.stringify(reason));
            // layer.alert(reason&&reason.text?reason.text:"对不起操作失败！",{
            //     title:"错误",
            //     icon: 2,
            //     btn:["知道了"],
            //     btn1:function (index,layerro) {
            //         layer.close(index);
            //     }
            // });
        };
    }
}
ChargeCurrOrderController.$inject = ["$rootScope","$scope","$state","UserService","AccountService","LotteryService"];

export default ChargeCurrOrderController;